package com.ytzl.bug_project.service.impl;

import com.ytzl.bug_project.entity.Bug_detail;
import com.ytzl.bug_project.mapper.Bug_detailMapper;
import com.ytzl.bug_project.service.Bug_detailService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.sql.Wrapper;
import java.util.List;

@Service
public class Bug_detailServiceImpl implements Bug_detailService {
    @Resource
    private Bug_detailMapper bug_detailMapper;
    @Override
    public List<Bug_detail> query(Wrapper wrapper) {
        List<Bug_detail> list = bug_detailMapper.selectList((com.baomidou.mybatisplus.core.conditions.Wrapper<Bug_detail>) wrapper);
        return list;
    }

    @Override
    public int insert(Bug_detail bug_detail) {
        return bug_detailMapper.insert(bug_detail);
    }

    @Override
    public int delete(Integer id) {
        return bug_detailMapper.deleteById(id);
    }

    @Override
    public int update(Bug_detail bug_detail) {
        return bug_detailMapper.updateById(bug_detail);
    }
}
